<!--COLUMNS & TAGS-->

<?
    $art_column_id = NULL;
    $art_subcolumn_id = NULL;

    if(isset($article[0])){
        $art_column_id = $article[0]['article_column_id']; 
        $art_subcolumn_id = $article[0]['article_subcolumn_id'];
    }
?>

<div style="width: 100%; display: none;">

    <h3 style="margin-bottom: 3px;">Rubrika članka</h3>

    <div id="srvrserror-3"></div>

    <div class="accordion_tmp" id="columns">

        <select name="column" id="column" style="color: #555555; line-height: 16px; padding: 3px 0 0 3px; width: 17em;">
            <option value="0">-- Molim odaberite</option>
            <?
                foreach($columns as $column){

                    if($column['name']!="tmp"){

                        echo '<optgroup label="'.$column["name"].'">';

                        foreach($subcolumns as $subcolumn){

                            if($subcolumn['column_id']==$column['id']){
                            ?><option value="<?=$subcolumn['id'];?>" <? if(($subcolumn['column_id']==$art_column_id)&&($subcolumn['id']==$art_subcolumn_id)){ echo 'selected=selected';} ?>><?=$subcolumn['name'];?></option><?

                            }

                        }

                    }
                }
            ?>
        </select>

    </div> 

    <h3 style="margin-top: 20px;margin-bottom: 3px;">Osobine članka</h3>                               

    <select id="tagovi" name="tagovi[]" multiple="multiple" title="-- Molimo odaberite" style="color: #555555; line-height: 16px; padding: 3px 0 0 3px;">
        <?
            $selected_tag = '';
            foreach($tags as $tag){

                foreach($articletags as $articletag){  

                    if($articletag['tag_id']==$tag['id']){
                        $selected_tag = 'selected="selected"';    
                    }

                }

            ?><option value="<?=$tag['id'];?>" <?=$selected_tag?>><?=$tag['title'];?></option><? 
                $selected_tag = ''; 
            }
        ?>
    </select>

    <hr>

    <button id="prev_3" class="small prev icon i_arrow_left">Povratak</button><button id="conf_category_tags" class="small icon i_arrow_right">Nastavi</button>



</div>